import { BwComTypeEnum } from '../../enums'

import type { BwCustomComNodeAttrModel } from './attrs'
import type { BwCustomComNodeIfInfoModel } from './if'
import type { BwCustomComNodeForInfoModel } from './for'
import type { BwCustomComNodeEnableSlotInfoModel } from './slots'
import type { BwCustomComNodeEventInfoModel } from '../emits'

export * from './if/enum'
export * from './for/enum'
export * from './attrs/enum'

export type * from './if'
export type * from './for'
export type * from './attrs'
export type * from './slots'

/** 当前自定义组件 DOM 模型 */
export interface BwCustomComStructModel {
  /** 组件名称（数据组件名称） */
  comName: string

  /** 组件类型 */
  comType: BwComTypeEnum

  /** 组件所属应用的标识 */
  comAppCode: string | null

  /** 节点ID */
  nodeId: string

  /** 节点名称 */
  nodeName: string

  /** 父级节点Id */
  parentNodeId: string | null

  /** 父级节点插槽 */
  parentNodeSlotCode: string | null

  /** 节点组件样式*/
  css: string | null

  /** 节点组件样式*/
  style: Record<string, string> | null

  /** 当前节点启用的插槽信息 */
  enableSlotList: Array<BwCustomComNodeEnableSlotInfoModel> | null

  /** 节点组件属性 */
  attrs: Record<string, BwCustomComNodeAttrModel> | null

  /** 节点组件事件回调列表 */
  events?: Array<BwCustomComNodeEventInfoModel> | null

  /** 子节点 */
  children?: Record<string, Array<BwCustomComStructModel>> | null

  /** 节点 If 信息 */
  nodeIfInfo?: BwCustomComNodeIfInfoModel

  /** 节点 For 信息 */
  nodeForInfo?: BwCustomComNodeForInfoModel
}
